import { observable, action } from 'mobx'
import { ajax } from '../../api'

class Forms {
    // 订单列表
    @observable formlist: Array<object> = []
    // 异步
    @action getformList = async (payload: any) => {
        let { code, result }: any = await ajax.getformlist(payload)
        if (code === 200) {
            this.formlist = result;
        }
    }
    // 查询
    @action searchList = async (payload: any) => {
        let { code, result }: any = await ajax.getformlist(payload)
        if (code === 200) {
            this.formlist = result;
        }
    }

    // 同步
    @action getlist = (payload:any)=>{
        this.formlist = payload
    }
}
export default new Forms()
